3.1.54 \(\int \text {csch}^2(c+d x) (a+b \tanh ^3(c+d x)) \, dx\) [54]

Optimal. Leaf size=29 \[ -\frac {a \coth (c+d x)}{d}+\frac {b \tanh ^2(c+d x)}{2 d} \]

[Out]

-a*coth(d*x+c)/d+1/2*b*tanh(d*x+c)^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3744, 14} \begin {gather*} \frac {b \tanh ^2(c+d x)}{2 d}-\frac {a \coth (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csch[c + d*x]^2*(a + b*Tanh[c + d*x]^3),x]

[Out]

-((a*Coth[c + d*x])/d) + (b*Tanh[c + d*x]^2)/(2*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3744

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff^(m + 1)/f), Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)
^(m/2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \text {csch}^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx &=\frac {\text {Subst}\left (\int \frac {a+b x^3}{x^2} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a}{x^2}+b x\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=-\frac {a \coth (c+d x)}{d}+\frac {b \tanh ^2(c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 29, normalized size = 1.00 \begin {gather*} -\frac {a \coth (c+d x)}{d}-\frac {b \text {sech}^2(c+d x)}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csch[c + d*x]^2*(a + b*Tanh[c + d*x]^3),x]

[Out]

-((a*Coth[c + d*x])/d) - (b*Sech[c + d*x]^2)/(2*d)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(79\) vs. \(2(27)=54\).
time = 2.87, size = 80, normalized size = 2.76

method result size
risch \(-\frac {2 \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 a \,{\mathrm e}^{2 d x +2 c}-b \,{\mathrm e}^{2 d x +2 c}+a \right )}{d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2} \left ({\mathrm e}^{2 d x +2 c}-1\right )}\) \(80\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csch(d*x+c)^2*(a+b*tanh(d*x+c)^3),x,method=_RETURNVERBOSE)

[Out]

-2*(a*exp(4*d*x+4*c)+b*exp(4*d*x+4*c)+2*a*exp(2*d*x+2*c)-b*exp(2*d*x+2*c)+a)/d/(1+exp(2*d*x+2*c))^2/(exp(2*d*x
+2*c)-1)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 44, normalized size = 1.52 \begin {gather*} \frac {2 \, a}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}} - \frac {2 \, b}{d {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^2*(a+b*tanh(d*x+c)^3),x, algorithm="maxima")

[Out]

2*a/(d*(e^(-2*d*x - 2*c) - 1)) - 2*b/(d*(e^(d*x + c) + e^(-d*x - c))^2)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (27) = 54\).
time = 0.33, size = 141, normalized size = 4.86 \begin {gather*} -\frac {2 \, {\left ({\left (2 \, a + b\right )} \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (2 \, a + b\right )} \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )}}{d \cosh \left (d x + c\right )^{4} + 6 \, d \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right )^{2} + 4 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + d \sinh \left (d x + c\right )^{4} + 4 \, {\left (d \cosh \left (d x + c\right )^{3} + d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^2*(a+b*tanh(d*x+c)^3),x, algorithm="fricas")

[Out]

-2*((2*a + b)*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + (2*a + b)*sinh(d*x + c)^2 + 2*a - b)/(d*cosh
(d*x + c)^4 + 6*d*cosh(d*x + c)^2*sinh(d*x + c)^2 + 4*d*cosh(d*x + c)*sinh(d*x + c)^3 + d*sinh(d*x + c)^4 + 4*
(d*cosh(d*x + c)^3 + d*cosh(d*x + c))*sinh(d*x + c) - d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right ) \operatorname {csch}^{2}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)**2*(a+b*tanh(d*x+c)**3),x)

[Out]

Integral((a + b*tanh(c + d*x)**3)*csch(c + d*x)**2, x)

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 45, normalized size = 1.55 \begin {gather*} -\frac {2 \, {\left (\frac {a}{e^{\left (2 \, d x + 2 \, c\right )} - 1} + \frac {b e^{\left (2 \, d x + 2 \, c\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}\right )}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csch(d*x+c)^2*(a+b*tanh(d*x+c)^3),x, algorithm="giac")

[Out]

-2*(a/(e^(2*d*x + 2*c) - 1) + b*e^(2*d*x + 2*c)/(e^(2*d*x + 2*c) + 1)^2)/d

________________________________________________________________________________________

Mupad [B]
time = 0.17, size = 79, normalized size = 2.72 \begin {gather*} -\frac {2\,\left (a+2\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}+a\,{\mathrm {e}}^{4\,c+4\,d\,x}-b\,{\mathrm {e}}^{2\,c+2\,d\,x}+b\,{\mathrm {e}}^{4\,c+4\,d\,x}\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )\,{\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*tanh(c + d*x)^3)/sinh(c + d*x)^2,x)

[Out]

-(2*(a + 2*a*exp(2*c + 2*d*x) + a*exp(4*c + 4*d*x) - b*exp(2*c + 2*d*x) + b*exp(4*c + 4*d*x)))/(d*(exp(2*c + 2
*d*x) - 1)*(exp(2*c + 2*d*x) + 1)^2)

________________________________________________________________________________________